<include file="Public:header" title="发布内容 - 内容管理" />
<h2>发布内容</h2>
<form id="articleEdit"  action="<{:U('addArticle')}>" method="post" onsubmit="return post_form('<{:U('addArticle')}>',this,'addTips');" >
<table style="width:850px;" class="nostyle">
	<tbody>
		<tr>
			<td style="width:8%;text-align:left;"><label for="articleTitle">文章标题</label></td>
			<td style="width:92%;" colspan="9"><input type="text" id="articleTitle" name="title" class="text" style="width:100%;" placeholder="标题" /></td>
		</tr>
		<tr>
			<td style="width:8%;text-align:left;"><label for="resSelector">资源类型</label></td>
			<td style="width:12%;">
				<select name="res" id="resSelector" style="width:100%;" onchange="return changeRes(1,this,'#categorySelector');">   
					<option value="-1">选择资源</option>    
					<option value="0">教辅</option>    
					<option value="1">视频</option>    
					<option value="2">测验</option>    
				</select>
			</td>
			<td style="width:4%;"><label for="categorySelector">类别</label></td>
			<td style="width:16%;">
				<select name="cid" id="categorySelector" style="width:100%;">   
					<option value="-1">请选择资源类型</option>       
				</select>
			</td>
			<td style="width:4%;"><label for="groupSelector">分组</label></td>
			<td style="width:16%;">
				<select name="gpid" id="groupSelector" style="width:100%;" onchange="return changeGroup(1,this,'#gradeSelector');">   
					<option value="-1">选择分组</option> 
					<volist name="groups" id="vo">
					<option value="<{$vo.id}>"><{$vo.cname}></option>  
					</volist>
				</select>
			</td>
			<td style="width:4%;"><label for="gradeSelector">年级</label></td>
			<td style="width:16%;">
				<select name="gdid" id="gradeSelector" style="width:100%;">   
					<option value="-1">请选择分组</option>    
				</select>
			</td>
			<td style="width:4%;"><label for="subjectSelector">科目</label></td>
			<td style="width:16%;">
				<select name="sid" id="subjectSelector" style="width:100%;"	 >   
					<volist name="subjects" id="vo">
					<option value="<{$vo.id}>"><{$vo.cname}></option>  
					</volist> 
				</select>
			</td>
		</tr>
		<tr>
			<td style="width:8%;text-align:left;"><label for="publisherUID">发布人ID</label></td>
			<td style="width:12%;"><input type="text" id="publisherUID" name="uid" class="text" style="width:90%;" placeholder="发布人UID" /></td>
			<td style="width:4%;"><label for="link">链接</label></td>
			<td style="width:76%;" colspan="7"><input type="text" id="link" name="link" class="text" style="width:100%;" placeholder="外部链接" /></td>
		</tr>
		<tr>
			<td colspan="10" style="text-align:left;"><label for="articleDesc">简介</label></td>
		</tr>
		<tr>
			<td colspan="10"><textarea id="articleDesc" name="desc" style="width:100%;height:50px;" class="text" placeholder="限200字，若不填则自动从内容截取"></textarea></td>
		</tr>
		<tr>
			<td colspan="10" style="text-align:left;"><label onclick="javacript:UE.getEditor('newEditor').focus();">正文</label></td>
		</tr>
		<tr>
			<td colspan="10" style="text-align:left;">
				<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
				<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/ueditor.all.min.js"> </script>
				<script type="text/javascript" charset="utf-8" src="__PUBLIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
				<script id="newEditor" name="content" type="text/plain" style="width:100%;height:500px;"></script>
				<script type="text/javascript">
				//实例化编辑器
				//建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
				UE.getEditor('newEditor');
				</script>	
			</td>
		</tr>
		<tr>
			<td colspan="10">
			<div id="addTips" class="tip fl" style="margin-top: 2px;width:100%;text-align:left;">添加提示</div>
			<input type="submit" value="发布" id="sendArticle" class="btn" style="width:100%;height:50px;margin-top:5px;font-size:20px;" />
			</td>
		</tr>
	</tbody>
</table>
</form>
<include file="Public:footer" />